import {get, post, del, put} from "@/apis/http/request";
import {Role} from "@/apis/model/system/RoleModel";

/**
 * 得到菜单列表
 * @param params
 */
export const getRoleList = (params: any) => get("/role/list", params)

/**
 * 得到菜单分页列表
 * @param params
 */
export const rolePage = (params: any) => post("/role/page", params)

/**
 * 删除数据
 * @param id 
 * @returns 
 */
export const deleteRoleById = (id: number) => del("/role/delete/"+ id)

/**
 * 新增数据
 * @param param
 */
export const insertRole = (param: Role) => post("/role", param)

/**
 * 更新数据
 * @param param
 */
export const updateRole = (param: Role) => put("/role", param)